﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ignitron.EEngine.Maths;

namespace Ignitron.EEngine.Model
{
    /// <summary>
    /// Class representing a bounding box around a model
    /// </summary>
    public class EBoundingBox
    {
        public float MinX
        { get; set; }

        public float MaxX
        { get; set; }

        public float MinY
        { get; set; }

        public float MaxY
        { get; set; }

        public float MinZ
        { get; set; }

        public float MaxZ
        { get; set; }

        public float WidthX
        {
            get { return MaxX - MinX; }
        }

        public float WidthY
        {
            get { return MaxY - MinY; }
        }

        public float WidthZ
        {
            get { return MaxZ - MinZ; }
        }

        public EVector3 Max
        {
            get
            {
                return new EVector3(MaxX, MaxY, MaxZ);
            }
        }

        public EVector3 Min
        {
            get
            {
                return new EVector3(MinX, MinY, MinZ);
            }
        }
    }
}
